package org.example.controller;

import lombok.extern.slf4j.Slf4j;
import org.example.dto.WxOfficalUserInfo;
import org.example.service.WxOfficalApiClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@Slf4j
public class WechatController {

    @Autowired
    private  WxOfficalApiClient wxOfficalApiClient;
    /**
     * 获取用户信息
     */
    @GetMapping("/getUserInfo")
    public WxOfficalUserInfo getUserInfo(String openId) {
        return wxOfficalApiClient.getUserInfo(openId);
    }

}
